<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理-增加</title>
<link href="../../../static/css/layout.css" rel="stylesheet" type="text/css" />
<link href="../../../static/css/cb.css" rel="stylesheet" type="text/css" />
<link href="../../../static/css/n.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css"
	href="../../../static/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../../static/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../../../static/easyui/demo/demo.css" />
<link rel="stylesheet" type="text/css"
	href="../../../static/js/laypage/skin/laypage.css" />
<script type="text/javascript" src="../../../static/easyui/jquery.min.js"></script>
<script src="../../../static/js/vue/vue.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../../static/js/laypage/laypage.js"></script>
<script type="text/javascript" src="../../../static/laydate/laydate.js"></script>
<link rel="stylesheet" href="../../../static/js/ztree/demo.css" type="text/css">
<link rel="stylesheet" href="../../../static/js/ztree/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="../../../static/js/ztree/jquery.ztree.core.min.js"></script>
<script type="text/javascript" src="../../../static/js/ztree/jquery.ztree.excheck.min.js"></script>
</head>
<body>
	<!-- 增加违规违纪记录弹出框 -->
	<div style="width:500px;height:500px;bgcolor:#AEDEF4;border:1px solid #ABDDF4;float:left;">
		<div class="zTreeDemoBackground left" style="width:240px;height:480px;float:left;border:1px;padding:2px">
			<ul id="treeDemo" class="ztree" style="height:460px"></ul>
		</div>
		<div style="width:240px;float:left;border:1px;padding:5px">
				<form id="form_edit" name="form1"> 
					<table width="240px" border="1" cellspacing="1">
						<tr>
							<td width="100px" align="right" style="font-size: 12px"><strong>角色名称:</strong></td>
							<td width="160px" align="left">
								<input type="text" name="roleName" id="roleName_detail" style="width: 160px; height: 20px" value="${roleObj.role.roleName}"/>
							</td>
						</tr>
						<tr>
							<td width="100px" align="right" style="font-size: 12px"><strong>角色描述:</strong></td>
							<td width="160px" align="left">
								<textarea rows="3" cols="20" name="roleDesc" id="roleDesc_detail">${roleObj.role.roleDesc}</textarea>
							</td>
						</tr>
						<tr>
						<td width="100px" align="right" style="font-size: 12px"><strong>角色状态:</strong></td>
						<td width="160px" align="left">
							<select style="width: 160px; height: 30px" name="status" id="status_detail"> 
								<option value="0" <#if roleObj.role.status=0>selected="selected"</#if>>禁用</option> 
								<option value="1" <#if roleObj.role.status=1>selected="selected"</#if>>启用</option> 
							</select>
						</td>
						</tr>
						<tr><td><input type="hidden" id="role_id" value="${roleObj.role.id}"/></td></tr>
					</table>
				</form>
			</div>
	</div>
	<SCRIPT type="text/javascript">
		var setting = {
			check: {
					enable: true,
					chkStyle: "checkbox",
					chkboxType: { "Y": "ps", "N": "s" }
				},
			data: {
				simpleData: {
					enable: true,
					idKey:"id",
					pIdKey:"pid",
					rootPId:0
				}
			},
			callback: {
				onCheck: zTreeOnCheck
			}
		};
		
		var nodes = new Array();
		
		function zTreeOnCheck(event, treeId, treeNode) {
	    	var treeObj=$.fn.zTree.getZTreeObj("treeDemo");
	       	var childNodes=treeObj.getCheckedNodes(true);
	        for(i = 0; i < childNodes.length; i++) {
	             nodes[i] = childNodes[i].id;
	        }
		};
		$(document).ready(function(){
			$.ajax({
				url:"/sysrole/getRoleTree?id="+$('#role_id').val(),
				type:"get",
				datatype:"json",
				success:function(result){
                    $.fn.zTree.init($("#treeDemo"), setting, result.data);
                }
				
			});
		});
	</SCRIPT>
</body>

</html>